package com.mall.b2c.domain.store;

import com.mall.b2c.domain.goods.GoodsDomain;
import com.mall.common.domain.BaseEntity;

import javax.persistence.*;

/**
 * Created by Misun on 2016/12/24.
 * 门店-商品关联类
 */
@Entity
@Table(name = "b2c_store_goods_link")
public class StoreGoodsDomain extends BaseEntity {

    private GoodsDomain goods;
    private StoreDomain store;
    private Boolean isMarketable;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "goods_id")
    public GoodsDomain getGoods() {
        return goods;
    }

    public void setGoods(GoodsDomain goods) {
        this.goods = goods;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "store_id")
    public StoreDomain getStore() {
        return store;
    }

    public void setStore(StoreDomain store) {
        this.store = store;
    }

    public Boolean getIsMarketable() {
        return isMarketable;
    }

    public void setIsMarketable(Boolean isMarketable) {
        this.isMarketable = isMarketable;
    }
}
